import { createRouter, createWebHistory } from 'vue-router';
import Home from '../components/MovieList.vue';
import CategoryPage from '../components/MovieList.vue';
import MovieDetail from '../components/MovieDetail.vue';

const routes = [
  { path: '/', name: 'Home', component: Home },
  { path: '/tv', name: 'TvSeries', component: CategoryPage, props: { category: 'tv' } },
  { path: '/movies', name: 'Movies', component: CategoryPage, props: { category: 'movies' } },
  { path: '/variety', name: 'Variety', component: CategoryPage, props: { category: 'variety' } },
  { path: '/anime', name: 'Anime', component: CategoryPage, props: { category: 'anime' } },
  { path: '/documentaries', name: 'Documentaries', component: CategoryPage, props: { category: 'documentaries' } },
  { path: '/movie/:id', name: 'MovieDetail', component: MovieDetail }
];

const router = createRouter({
  history: createWebHistory(),
  routes
});

export default router;